package fibonacci3dphysics;

import processing.core.*;
import toxi.physics.VerletParticle;

public class Cell extends VerletParticle{

	float cellSize;
	float wCoeff;
	PApplet parent;
	
	Cell(PApplet p_, PVector pos_)
	{
		
		super(pos_.x, pos_.y, pos_.z);
		parent = p_;
		wCoeff = 1.0f;
		cellSize = 40.0f;
	}
	Cell(PApplet p_, PVector pos_, float w_)
	{
		super(pos_.x, pos_.y, pos_.z, w_);
		parent = p_;
		wCoeff = 1.5f;
		cellSize = wCoeff * w_;
	}
	Cell(PApplet p_, PVector pos_, float w_, float coe_)
	{
		super(pos_.x, pos_.y, pos_.z, w_);
		parent = p_;
		wCoeff = coe_;
		cellSize = wCoeff * w_;
	}
	
	void draw()
	{
		parent.pushMatrix();
		parent.translate(x, y, z);
		parent.box(cellSize);
		parent.popMatrix();
	}
}
